package com.woniuxy.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import com.woniuxy.entity.Allocation;
import com.woniuxy.entity.Out_Bound;

@Mapper
public interface AllocationMapper {
	//查询所有出库
	@Select("select * from t_allocation")
	public List<Allocation> findAllocation();
	
	//查询指定单号,出库详情
	@Select("select * from t_allocation where aorder=#{aorder}")
	public List<Allocation> findAllocationById(String aorder);
	
	@Insert("insert into t_allocation values(default,#{aorder},#{cgname},#{sname},#{dname},"
			+ "#{pname},#{weight},#{num},#{status},#{pname},#{atime},#{mname},#{mtime})")
	public int  insertAllocation(Allocation allocation);
	
	@Delete("delete from t_allocation where aorder=#{aorder}")
	public int deleteAllocationById(String aorder);

}
